package routers

import (
	"audio/controller"
	"audio/middleware"
	"github.com/gin-gonic/gin"
	"strconv"
	"time"
)

func Route(r *gin.Engine) {
	r.GET("/ping", func(context *gin.Context) {
		context.JSON(200, gin.H{
			"msg": strconv.FormatInt(time.Now().Unix(),10),
		})
	})

	r.Use(middleware.Cors())
	r.GET("/callback", controller.Callback())
	r.GET("/jsconfig",controller.JsConfigInfo())
}
